<include file="__PUBLIC__/header"/>
<div class="page-container">
    <!--菜单-->
    <div class="cl pd-5 bg-1 bk-gray mt-10 mb-10">
        <span class="l">
            <a href="{|U:'backup'}" class="btn btn-primary radius"><i class="Hui-iconfont">&#xe600;</i> 备份数据</a>
        </span>
        <span class="r" style="line-height:1.6em;margin-top:3px"><strong></strong></span>
    </div>
    <!--列表-->
    <table class="table table-border table-bordered table-bg mt-10 table-sort" id="table">
        <thead>
        <tr class="text-c">
            <th>备份目录</th>
            <th>备份时间</th>
            <th>大小</th>
            <th>操作</th>
        </tr>
        </thead>
        <tbody>
        <list from="$dir" name="$qz">
            <tr class="text-c">
                <td>{$qz.filename}</td>
                <td>{$qz.filemtime|date:'Y-m-d h:i:s',@@}</td>
                <td>{$qz.size|get_size}</td>
                <td width="100">
                    <a title="还原" href="javascript:;"
                       onclick="dbRecovery('{|U:'recovery',array('dir'=>$qz['filename'])}','您确定还原到此数据吗？')" class="label label-default radius"><i class="Hui-iconfont">&#xe645;</i></a>
                    <a title="删除" href="javascript:;" onclick="del_forever(this,'{$qz['filename']}','{|U:'del'}')"
                       class="label label-danger radius"><i class="Hui-iconfont">&#xe6e2;</i></a>
                </td>
            </tr>
        </list>
    </table>
</div>
<include file="__PUBLIC__/footer"/>
<script>
    function dbRecovery(url,msg) {
        layer.confirm(msg, {
            btn: ['确定', '取消'],
            title: '提示',
            icon: 3
        }, function () {
            window.location.href = url;
        }, function (index) {
            layer.close(index);
        });
    }
</script>
</body>
</html>